---

- name: NEXUS | Set LDAP access
  import_tasks: ../../script/run_script.yml
  vars:
    script_name: security_ldap
    args:
      name: "{{ item.name }}"
      protocol: "{{ item.protocol }}"
      host: "{{ item.host }}"
      port: "{{ item.port }}"
      use_trust_store: "{{ item.use_trust_store | default(False) }}"
      manager_dn: "{{ item.manager_dn | default('') }}"
      password: "{{ item.password | default('') }}"
      base_dn: "{{ item.base_dn | default('') }}"
      search_base: "{{ item.search_base | default('') }}"
      filter: "{{ item.filter | default('') }}"
      user_object_class: "{{ item.user_object_class }}"
      user_id_attribute: "{{ item.user_id_attribute }}"
      user_real_name_attribute: "{{ item.user_real_name_attribute }}"
      user_email_attribute: "{{ item.user_email_attribute }}"
      user_subtree: "{{ item.user_subtree }}"
      map_groups_as_roles: "{{ item.map_groups_as_roles }}"
      group_type_dynamic: "{{ item.group_type_dynamic | default(false)}}"
      user_member_of_attribute: "{{ item.user_member_of_attribute | default('') }}"
      group_base_dn: "{{ item.group_base_dn | default('') }}"
      group_object_class: "{{ item.group_object_class | default('') }}"
      group_id_attribute: "{{ item.group_id_attribute  | default('') }}"
      group_member_attribute: "{{ item.group_member_attribute | default('') }}"
      group_member_format: "{{ item.group_member_format | default('') }}"
      group_subtree: "{{ item.group_subtree  | default(false)}}"
